package com.erp.service.impl;

import com.erp.entity.Warehouse;
import com.erp.mapper.WarehouseMapper;
import com.erp.service.WarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class WarehouseServiceImpl implements WarehouseService {

    @Autowired
    private WarehouseMapper warehouseMapper;
    
    @Override
    public Warehouse findWarehouseByName(String name) {
        return null;
    }

    @Override
    public List<Warehouse> getAll() {
        return warehouseMapper.getAll();
    }

    @Override
    public int add(Warehouse warehouse) {
        return warehouseMapper.add(warehouse);
    }

    @Override
    public int delete(Integer id) {
        return warehouseMapper.delete(id);
    }

    @Override
    public int update(Warehouse warehouse) {
        return warehouseMapper.update(warehouse);
    }
}
